<template>
    <div class="wrap">
        <div class="container">
            <TopBreadCrumb></TopBreadCrumb>
            <div class="user_center_content">
                <!-- 左侧菜单 -->
                <LeftNavMenu></LeftNavMenu>
                <!-- 左侧菜单结束 -->
                <!-- 右侧内容开始  -->
                <div class="right_user_content">
                    <!-- 用户信息 -->
                    <div class="user-box">
                        <div class="avatar-box">
                            <div class="avatar"><img :src="$commonImageUrl(userInfo.avatar)" /></div>
                            <div class="">
                                <div class="accountName">{{ userInfo !=null? userInfo.nickname:'' }}</div>
                                <div class="firm">{{ OurData.name }}</div>
                            </div>
                        </div>
                        <div class="user-info">
                            <div class="num">140</div>
                            <span class="text">全部订单</span>
                        </div>
                        <div class="user-info">
                            <div class="num">15</div>
                            <span class="text">关联企业</span>
                        </div>
                        <div class="user-info">
                            <div class="num"><nuxt-link to="/agency/cargoDetail">{{ OurData.goods_num }}</nuxt-link></div>
                            <span class="text">货物明细</span>
                        </div>
                    </div>
                    <!-- 用户信息结束 -->
                    <div class="select_nav_title">
                        <div class="title">最近订单</div>
                    </div>
                    <div class="order_content" id="ddorder">
                        <div class="order_list">
                            <div class="order_head">
                                <div class="flex justify-content">
                                    <div class="order_desc">
                                        <div class="label">常规</div>
                                        <div>订单号：3290187034038408407</div>
                                        <div>订单生成时间：2023-05-10 15:29:02</div>
                                    </div>
                                    <div>订单状态：待付款-待发货</div>
                                </div>
                                <div class="order_enterprise">企&nbsp;&nbsp;&nbsp;&nbsp;业：北京鑫康辰医学科技发展有限公司</div>
                            </div>
                            <div class="order_info">
                                <div class="order_goods_content">
                                    <div class="order_goods_list">
                                        <div class="order_goods_info">
                                            <div class="order_goods_img">
                                                <img src="@/assets/images/img.png">
                                            </div>
                                            <div class="goods_spec_info">
                                                <div class="goods_name">同种异体肌腱</div>
                                                <div>型号：150680431530</div>
                                                <div>规格：200x20x5mm</div>
                                                <div>备注：多种产品规格满足临床不同需求</div>
                                            </div>
                                        </div>
                                        <div class="company_name">北京鑫康辰医学科技发展有限公司</div>
                                        <div class="goods_price">￥230.00</div>
                                        <div class="car_num_operate">10</div>
                                    </div>
                                    <div class="order_goods_list">
                                        <div class="order_goods_info">
                                            <div class="order_goods_img">
                                                <img src="@/assets/images/img.png">
                                            </div>
                                            <div class="goods_spec_info">
                                                <div class="goods_name">同种异体肌腱</div>
                                                <div>型号：150680431530</div>
                                                <div>规格：200x20x5mm</div>
                                                <div>备注：多种产品规格满足临床不同需求</div>
                                            </div>
                                        </div>
                                        <div class="company_name">北京鑫康辰医学科技发展有限公司</div>
                                        <div class="goods_price">￥230.00</div>
                                        <div class="car_num_operate">10</div>
                                    </div>
                                </div>
                                <div class="list_count_price">
                                    <div>￥230.00</div>
                                    <div class="express_price">(含运费￥0.00)</div>
                                </div>
                                <div class="operate_delete">
                                    <div class="now_pay">订单详情</div>
                                </div>
                            </div>
                        </div>

                        <div class="order_list">
                            <div class="order_head">
                                <div class="flex justify-content">
                                    <div class="order_desc">
                                        <div class="label">常规</div>
                                        <div>订单号：3290187034038408407</div>
                                        <div>订单生成时间：2023-05-10 15:29:02</div>
                                    </div>
                                    <div>订单状态：待付款-待收货</div>
                                </div>
                                <div class="order_enterprise">企&nbsp;&nbsp;&nbsp;&nbsp;业：北京鑫康辰医学科技发展有限公司</div>
                            </div>
                            <div class="order_info">
                                <div class="order_goods_content">

                                    <div class="order_goods_list">
                                        <div class="order_goods_info">
                                            <div class="order_goods_img">
                                                <img src="@/assets/images/img.png">
                                            </div>
                                            <div class="goods_spec_info">
                                                <div class="goods_name">同种异体肌腱</div>
                                                <div>型号：150680431530</div>
                                                <div>规格：200x20x5mm</div>
                                                <div>备注：多种产品规格满足临床不同需求</div>
                                            </div>
                                        </div>
                                        <div class="company_name">北京鑫康辰医学科技发展有限公司</div>
                                        <div class="goods_price">￥230.00</div>
                                        <div class="car_num_operate">10</div>
                                    </div>
                                </div>

                                <div class="list_count_price">
                                    <div>￥230.00</div>
                                    <div class="express_price">(含运费￥0.00)</div>
                                </div>
                                <div class="operate_delete">
                                    <div class="now_pay">订单详情</div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
                <!-- 右侧内容结束 -->
            </div>
        </div>
    </div>
</template>

<script>
import $ from "jquery"
import api from "@/api/enterprise"
import CustomPagination from '../../components/CustomPagination.vue';
import { getUser } from "@/utils/auth";
export default {
    name:"agency-index",
    data() {
        return {
            OurData:{
                blance: "0.00",
                total_amount: "0.00",
                goods_num : 0,
                name: "请先设置默认企业"
            }
        };
    },
    computed:{
        userInfo(){
            let data = getUser();
            return data;
        },
    },
    created(){
        this.doLoadData();
    },
    methods: {
        doLoadData:function(){
            this.InitOursData()
        },
        // 加载数据
        InitOursData:function(){
            let _this = this;
            api.GetDefaultEr()
                .then(res => {
                    if(res.data != null)
                        _this.OurData = res.data;
                }).catch((err) => {

                });
        }
    },
    mounted: function(){

    }
};
</script>
<style>
   
</style>